Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the trix-action-invoke event #1189

Merged

Conversation

seanpdoyle
Copy link
Contributor

The Trix Wiki has a page documenting how to customize the Toolbar element. Its a helpful, thorough document with a lot of great information, including how to invoke custom actions through the rendering elements with an x-prefixed [data-trix-action] attribute.

Since this information is at the bottom of the wiki page, it isn't readily available from the README.md. The trix-action-invoke event that's dispatched is also omitted from the README's list of events.

This commit promotes the contents of the wiki page into the README, documents the trix-action-invoke event, and adds missing test coverage that exercises the event.

The [Trix Wiki][wiki] has a page documenting how to [customize the
Toolbar element][toolbar]. Its a helpful, thorough document with a lot
of great information, including how to invoke custom actions through the
rendering elements with an `x`-prefixed `[data-trix-action]` attribute.

Since this information is at the bottom of the wiki page, it isn't
readily available from the `README.md`. The `trix-action-invoke` event
that's dispatched is also omitted from the README's list of events.

This commit promotes the contents of the wiki page into the `README`,
documents the `trix-action-invoke` event, and adds missing test coverage
that exercises the event.

[wiki]: https://github.com/basecamp/trix/wiki/Configuration
[toolbar]: https://github.com/basecamp/trix/wiki/Configuration#toolbar
@seanpdoyle
Copy link
Contributor Author

@jorgemanrubia the wiki page includes a lot of helpful information. If this change is merged, would it make sense to remove the Configuration pages from the Wiki so that the information isn't duplicated and prone to drifting out of sync?

Copy link
Member

@jorgemanrubia jorgemanrubia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @seanpdoyle I agree this makes more sense in the README. I deleted the wiki page.

@jorgemanrubia jorgemanrubia merged commit a15d0b8 into basecamp:main Oct 1, 2024
1 check passed
@seanpdoyle seanpdoyle deleted the document-trix-action-invoke-event branch October 1, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants